package com.imb.provider.controller;

import com.imb.common.core.annotation.ApiLog;
import com.imb.common.core.enums.OperateEnum;
import com.imb.common.web.result.JsonResult;
import com.imb.provider.service.UserService;
import com.imb.provider.vo.UserInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xzhi
 * @desc
 * @date 2024-09-24
 */
@RestController
@RequestMapping("/api/user")
@Api(tags = "用户模块")
@Slf4j(topic = "api-log")
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;

    @GetMapping("/currUser")
    @ApiOperation(value = "获取当前账号信息")
    @ApiLog(method = "获取当前账号信息",type = OperateEnum.QUEY)
    public JsonResult<UserInfoVo> currUser() {
        return JsonResult.success(userService.queryUserInfo());
    }







}
